package org.demo.filemanager.widget.xml;

import org.boxlayout.gui.BoxLayoutEngine;
import org.boxlayout.gui.layout.LayoutFactory;
import org.boxlayout.gui.type.ColorEnum;
import org.boxlayout.gui.widget.TreeBrowsable;
import org.demo.filemanager.Selector;
import org.w3c.dom.Node;

public class XmlTextWidget extends XmlNodeWidget{

	public XmlTextWidget(BoxLayoutEngine ble, Selector selector, Node node) {
		super(ble, node);
		
	}
	
	public TreeBrowsable initVisual() {
		//System.out.println("FileWidget init begin");
		color = defaultColor;

		nameContainer = ble.createElement().setLayout(LayoutFactory.getInstance().getHorizontalLayout())
		.setPadding(0.00f).setColor(color).setColor2(ColorEnum.LIGHTGRAY).setText(node.getNodeValue());
		visual = ble.createElement().setLayout(LayoutFactory.getInstance().getVerticalLayout())
		.setPadding(0.00f).setColor(color).setColor2(ColorEnum.LIGHTGRAY).add(nameContainer);
		return this;
	}

}
